From 36553c2859c579212cb5cf264ecddf8909124b2a Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 19 Jun 2009 08:43:28 +0100 Subject: [PATCH] xend: fix BlktapController's device creation Reset BlktapController's device class back to 'tap' once the device has been created. This fixes save/restore for VMs with blktap2 disks. Signed-off-by: Ryan O'Connor Signed-off-by: Dutch Meyer --- tools/python/xen/xend/server/BlktapController.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/server/BlktapController.py b/tools/python/xen/xend/server/BlktapController.py index 24d96ee581..2e6c93a896 100644 --- a/tools/python/xen/xend/server/BlktapController.py +++ b/tools/python/xen/xend/server/BlktapController.py @@ -159,6 +159,8 @@ class BlktapController(BlkifController): #modify the configuration to attach as a vbd, now that the #device is configured. Then continue to create the device config.update({'uname' : 'phy:' + device.rstrip()}) - self.deviceClass='vbd' - return BlkifController.createDevice(self, config); + self.deviceClass='vbd' + devid = BlkifController.createDevice(self, config) + self.deviceClass='tap' + return devid -- 2.30.2